//Source file: D:\\JavaSE\\software-learning\\software-engineering\\work3\\BookingSystem.java


public class BookingSystem {
      private User user;
      private HotelRoom room;

      public BookingSystem(User user, HotelRoom room) {
         this.user = user;
         this.room = room;
      }

      public double bookRoom() {
         double discountedPrice = user.calculateDiscount(room.getPrice());
         System.out.println("Total price for the room: " + discountedPrice);
         return discountedPrice;
      }

      public static void main(String[] args) {
         HotelRoom room = new HotelRoom(100.0); // Room price is $100

         User normalUser = new normalUser();
         BookingSystem normalBooking = new BookingSystem(normalUser, room);
         normalBooking.bookRoom();

         User goldCardUser = new goldCardUser();
         BookingSystem goldBooking = new BookingSystem(goldCardUser, room);
         goldBooking.bookRoom();

         User silverCardUser = new silverCardUser();
         BookingSystem silverBooking = new BookingSystem(silverCardUser, room);
         silverBooking.bookRoom();
      }
   }
